﻿<MudPopoverProvider />

<MudDateRangePicker id="picker" @ref="_picker" Label="With action buttons" @bind-DateRange="DateRange" AutoClose="@AutoClose">
    <PickerActions>
        <MudButton Class="mr-auto align-self-start" OnClick="@(() => _picker.ClearAsync())">Clear</MudButton>
        <MudButton OnClick="@(() => _picker.CloseAsync(false))">Cancel</MudButton>
        <MudButton Color="Color.Primary" OnClick="@(() => _picker.CloseAsync())">OK</MudButton>
    </PickerActions>
</MudDateRangePicker>

@code {
    private MudDateRangePicker _picker = null!;

    [Parameter]
    public DateRange? DateRange { get; set; }

    [Parameter]
    public bool AutoClose { get; set; }
}